package org.dromara.business.service;

import org.dromara.business.domain.ShoppingCart;
import org.dromara.business.domain.vo.ShoppingCartVo;
import org.dromara.business.domain.bo.ShoppingCartBo;
import com.baomidou.mybatisplus.extension.service.IService;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.mybatis.core.page.PageQuery;

import java.util.Collection;
import java.util.List;

/**
 * 购物车Service接口
 *
 * @author zlj
 * @date 2024-08-20
 */
public interface ShoppingCartService extends IService<ShoppingCart> {

    /**
     * 查询购物车
     */
    ShoppingCartVo queryById(Long shoppingCartId);

    /**
     * 查询购物车列表
     */
    TableDataInfo<ShoppingCartVo> queryPageList(ShoppingCartBo bo, PageQuery pageQuery);

    /**
     * 查询购物车列表
     */
    List<ShoppingCartVo> queryList(ShoppingCartBo bo);

    /**
     * 新增购物车
     */
    Boolean insertByBo(ShoppingCartBo bo);

    /**
     * 修改购物车
     */
    Boolean updateByBo(ShoppingCartBo bo);

    /**
     * 校验并批量删除购物车信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);


    Boolean clear();
}
